﻿using LPY.LeHealth.DTO;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace LPY.LeHealth.DAL
{
    using ServiceStack.OrmLite;

    public class AppImageDal:BaseDAL
    {
        /// <summary>
        /// 查询指定条数的数据，并按Id倒序
        /// </summary>
        /// <returns></returns>
        public List<AppImage> Get(int num)
        {
            using (var cnn=DbConnection)
            {
                var sql = cnn.From<AppImage>()
                    .Take(num)
                    .OrderByDescending(m => m.Id);
                return cnn.Select(sql);
            }
        }
    }
}
